/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package we.dispatcher.writer;

import we.dispatcher.CPacketWriter;

/**
 *
 * @author ADMIN
 */
public class StrLenWriteProc implements IWritingProcessor{    
    private int maxLength;
    public StrLenWriteProc(int maxLength) {
        this.maxLength = maxLength;
    }    
    
    @Override
    public void write(CPacketWriter writer, Object obj) {
        String s = (String) obj;
        writer.PutString(s, maxLength);
    }
    
}
